<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>employee</title>
<link rel="stylesheet" type="text/css" href="<%=basePath%>resources/css/form.css">
</head>
<body>
	<table id="dg-employee" fit="true"></table>
	<div id="tb">
		<a href="javascript:void(0)" class="easyui-linkbutton" onclick="add()"
			data-options="iconCls:'icon-add',plain:true">增加</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" onclick="edit()"
			data-options="iconCls:'icon-edit',plain:true">编辑</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" onclick="deleteEmployee()"
			data-options="iconCls:'icon-remove',plain:true">删除</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" onclick="assignJob()"
			data-options="iconCls:'icon-edit',plain:true">职位分配</a>	
	</div>
	<!-- 增加div -->
	<div id="add" style="width:300px;height:330px;">
	<form id="ff1" action="" class="form">
	<table class="table" style="width:250px;height:200px;border:1px">
		<tr>
			<td class="label">姓名:</td>
			<td class="input"><input name="name" type="text" class="easyui-validatebox" data-options="required:true" /></td>
		</tr>
		<tr>
			<td class="label">登录名：</td>
			<td class="input"><input name="usr" type="text" class="easyui-validatebox" data-options="required:true" /></td>
		</tr>
		<tr>
			<td class="label">密码:</td>
			<td class="input"><input name="pwd" type="password" class="easyui-validatebox" data-options="required:true" /></td>
		</tr>
		<tr>
			<td class="label">邮箱：</td>
			<td class="input"><input name="email" type="text" class="easyui-validatebox" data-options="required:true" /></td>
		</tr>
		<tr>
			<td class="label">性别:</td>
			<td class="input">
				<select id="sex1" name="sex" class="easyui-combobox">
					    <option value="m">male</option>
					    <option value="f">female</option>
				</select>
			</td>
		</tr>
		<tr>
			<td class="label">年龄:</td>
			<td class="input"><input name="age" type="text" class="easyui-numberbox" value="20" data-options="min:16,precision:0,required:true" /></td>
		</tr>
		<tr>
			<td class="label">身份证:</td>
			<td class="input"><input name="idCount" type="text" class="easyui-numberbox" data-options="precision:0,required:true" /></td>
		</tr>
		<tr>
			<td class="label">地址:</td>
			<td class="input"><input name="addr" type="text" class="easyui-validatebox" data-options="required:true" /></td>
		</tr>
		<tr>
			<td colspan="2" class="btn">
				<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="saveAddEmployee()">保存</a>
				<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-undo'" onclick="undoAddEmployee()">取消</a>
			</td>
		</tr>		
	</table>
	</form>
	</div>
	<!-- 编辑div -->
	<div id="edit" style="width:300px;height:330px;">
	<form id="ff2" action="" class="form">
	<table class="table" style="width:250px;height:200px;border:1px">
		<tr>
			<td class="label">姓名:</td>
			<td class="input"><input name="name" type="text" class="easyui-validatebox" data-options="required:true" /></td>
		</tr>
		<tr>
			<td class="label">登录名：</td>
			<td class="input"><input name="usr" type="text" class="easyui-validatebox" data-options="required:true" /></td>
		</tr>
		<tr>
			<td class="label">密码:</td>
			<td class="input"><input name="pwd" type="password" class="easyui-validatebox" data-options="required:true" /></td>
		</tr>
		<tr>
			<td class="label">邮箱：</td>
			<td class="input"><input name="email" type="text" class="easyui-validatebox" data-options="required:true" /></td>
		</tr>
		<tr>
			<td class="label">性别:</td>
			<td class="input">
				<select id="sex2" name="sex" class="easyui-combobox">
					    <option value="m">male</option>
					    <option value="f">female</option>
				</select>
			</td>
		</tr>
		<tr>
			<td class="label">年龄:</td>
			<td class="input"><input name="age" id="age" type="text" class="easyui-numberbox" value="20" data-options="min:16,precision:0,required:true" /></td>
		</tr>
		<tr>
			<td class="label">身份证:</td>
			<td class="input"><input name="idCount" id="idCount" type="text" class="easyui-numberbox" data-options="precision:0,required:true" /></td>
		</tr>
		<tr>
			<td class="label">地址:</td>
			<td class="input"><input name="addr" type="text" class="easyui-validatebox" data-options="required:true" /></td>
		</tr>
		<tr>
			<td colspan="2" class="btn">
				<a id="saveEditEmployee" href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save'">保存</a>
				<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-undo'" onclick="undoEditEmployee()">取消</a>
			</td>
		</tr>		
	</table>
	</form>
	</div>
	<!-- 职位分配div -->
	<div id="assignJob" style="width:300px;height:150px;">
	<table class="table" style="width:250px;height:100px;border:1px">
		<tr>
			<td class="label">部门:</td>
			<td class="input">
			<select id="department" style="width:150px" class="easyui-combobox"></select>
			</td>
		</tr>
		<tr>
			<td class="label">职位:</td>
			<td class="input">
				<select id="position" style="width:150px" class="easyui-combobox"></select>
			</td>
		</tr>
		<tr>
			<td colspan="2" class="btn">
				<a id="saveJob" href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save'">保存</a>
				<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-undo'" onclick="undoSaveJob()">取消</a>
			</td>
		</tr>
	</table>
	</div>
	
<script type="text/javascript">
	var basePath = '<%=basePath%>';
</script>
<script type="text/javascript" src="<%=basePath%>resources/scripts/employee/employee.js"></script>
</body>
</html>